added Feb 2001 SDK
[windows-sources.git] / shared source / sscli20 / jscript / engine / vsa2.cs
blobe27a5257be1d88585d2c8dc16cb01fad6d9f60ab
1 // ==++==
2 //
3 //
4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
5 //
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
10 //
11 // You must not remove this notice, or any other, from this software.
12 //
13 //
14 // ==--==
16 //*************************************************************************************
17 // Vsa2.cs
19 // Contain the definitons of all the extra interfaces needed to make IActiveScript work
20 //*************************************************************************************
22 namespace Microsoft.JScript{
24 using Microsoft.JScript.Vsa;
25 using System;
26 using Microsoft.Vsa;
27 using System.Reflection;
28 using System.Reflection.Emit;
29 using System.Runtime.InteropServices;
30 using System.Security;
31 using System.Security.Permissions;
33 //*************************************************************************************
34 // IEngine2
36 // Implemented by the VsaEngine, provide the extra functionality needed by an
37 // IActiveScript host
38 //*************************************************************************************
39 [System.Runtime.InteropServices.GuidAttribute("BFF6C97F-0705-4394-88B8-A03A4B8B4CD7")]
40 [System.Runtime.InteropServices.ComVisible(true)]
41 public interface IEngine2{
42 System.Reflection.Assembly GetAssembly();
43 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
44 void Run(System.AppDomain domain);
45 bool CompileEmpty();
46 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
47 void RunEmpty();
48 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
49 void DisconnectEvents();
50 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
51 void ConnectEvents();
52 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
53 void RegisterEventSource(String name);
54 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
55 void Interrupt();
56 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
57 void InitVsaEngine(String rootMoniker, IVsaSite site);
58 IVsaScriptScope GetGlobalScope();
59 Module GetModule();
60 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
61 IVsaEngine Clone(System.AppDomain domain);
62 [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
63 void Restart();
66 //*************************************************************************************
67 // ISite2
69 // Implemented by the IActiveScript site, provide the extra functionality needed by
70 // the VsaEngine
71 //*************************************************************************************
72 [System.Runtime.InteropServices.GuidAttribute("BFF6C980-0705-4394-88B8-A03A4B8B4CD7")]
73 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
74 [System.Runtime.InteropServices.ComVisible(true)]
75 public interface ISite2{
76 Object[] GetParentChain(Object obj);
80 //*************************************************************************************
81 // VSAITEMTYPE2
83 // Extendion to the types of Item Type available
84 //*************************************************************************************
85 [System.Runtime.InteropServices.GuidAttribute("581AD3D9-2BAA-3770-B92B-38607E1B463A")]
86 [System.Runtime.InteropServices.ComVisible(true)]
87 public enum VSAITEMTYPE2{
88 None = 0x00,
89 HOSTOBJECT = 0x10,
90 HOSTSCOPE,
91 HOSTSCOPEANDOBJECT,
92 SCRIPTSCOPE,
96 //*************************************************************************************
97 // IVsaScriptScope
99 // What was known to be a module in the IActiveScript interface. This functionality
100 // is what behavior in IE will use.
101 //*************************************************************************************
102 [System.Runtime.InteropServices.GuidAttribute("ED4BAE22-2F3C-419a-B487-CF869E716B95")]
103 [System.Runtime.InteropServices.ComVisible(true)]
104 public interface IVsaScriptScope : IVsaItem{
105 IVsaScriptScope Parent{ get; }
107 IVsaItem AddItem(string itemName, VsaItemType type);
108 IVsaItem GetItem(string itemName);
109 void RemoveItem(string itemName);
110 void RemoveItem(IVsaItem item);
112 int GetItemCount();
113 IVsaItem GetItemAtIndex(int index);
114 void RemoveItemAtIndex(int index);
115 Object GetObject();
117 IVsaItem CreateDynamicItem(string itemName, VsaItemType type);
121 //*************************************************************************************
122 // IVsaFullErrorInfo
124 // Used by the authoring environment to get extra information about errors
125 //*************************************************************************************
126 [System.Runtime.InteropServices.GuidAttribute("DC3691BC-F188-4b67-8338-326671E0F3F6")]
127 [System.Runtime.InteropServices.ComVisible(true)]
128 public interface IVsaFullErrorInfo : Microsoft.Vsa.IVsaError{
129 int EndLine{ get; }